import mongoose from 'mongoose';
import config from '../config';
import '../app/models';

export default function init() {
  mongoose.Promise = global.Promise;
  mongoose.connect(config.MONGO, config.MONGO_CONFIG);
  return mongoose;
}
